package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	UserName string `gorm:"type:varchar(50)"json:"userName"`
	Password string `gorm:"type:varchar(255)"json:"password"`
}
type Title struct {
	gorm.Model
	Title   string `gorm:"type:varchar(30)"json:"title"`
	Content string `gorm:"type:varchar(50)"json:"content"`
	Img     string `gorm:"type:varchar(255)"json:"img"`
	UserID  int    `gorm:"type:int"json:"user_id"`
	User    User   `gorm:"foreignKey:UserID"json:"user"`
}
